package com.bdqn.t382.service.impl;

import com.bdqn.t382.mapper.SysUserMapper;
import com.bdqn.t382.pojo.SysUser;
import com.bdqn.t382.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImp implements SysUserService {
    // 定义 Mapper
    @Autowired
    SysUserMapper sysUserMapper;


    @Override
    public List<SysUser> findList(SysUser sysUser) {
        return sysUserMapper.getSysUserList(sysUser);
    }

    @Override
    public int saveBatch(SysUser sysUserList) {
        return sysUserMapper.insert(sysUserList);
    }

    @Override
    public int updateBatch(SysUser sysUserList) {
        return sysUserMapper.update(sysUserList);
    }

    @Override
    public int deleteBatch(Integer idList) {
        return sysUserMapper.delete(idList);
    }

    @Override
    public SysUser getById(Integer id) {
        return sysUserMapper.getSysUserById(id);
    }

    @Override
    public SysUser getSysUserByAccountBiz(String account) {
        return sysUserMapper.getSysUserByAccount(account);
    }
}
